home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
BSBOOT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-26
|
3KB
|
95 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: bsboot.c
// Title: Base library
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
//
// This module contains code to reboot a computer.
//
// The code in this module should be written entirely in C.
// Do not use any C++ constructs.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
// SCO UNIX.
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
// SCO UNIX cc
//
//----------------------------------------------------------------------------
#include <bs.h>
//----------------------------------------------------------------------------
// Description: Boot computer
// Parameters: fWarm Warm boot?
// Returns:
//----------------------------------------------------------------------------
VOID FN_E Boot(BOOL fWarm)
{
#if OS_DOS
void (far *bootsystem)(void);
if (fWarm)
{
unsigned far *warm = MK_FP (0x0000, 0x0472);
*warm = 0x1234;
Log(LOG_VERY_HIGH, "Warm boot.");
puts("\nWarm boot in progress...\n");
}
else
{
Log(LOG_VERY_HIGH, "Cold boot.");
puts ("\nCold boot in progress...\n");
}
bootsystem = MK_FP (0xFFFF, 0x0000);
(*bootsystem) ();
#else
NOTUSED(fWarm);
#endif
return ;
}
//----------------------------------------------------------------------------
// Description: Run standard test suite
// Parameters: sTest Test to run.
// 0 Run all default tests (except).
// Returns: TRUE if successful.
//----------------------------------------------------------------------------
#if COMPILE_TEST
BOOL FN BootTest(SHORT sTest)
{
Boot(sTest == 0);
return TRUE;
}
#endif
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------